<template>
  <sn-row-has-four-col
      class="to-flex"
      :one="2"
      :two="7"
      :three="4"
      :four="7">
    <sn-text
      text="创建时间"
      slot="one-col"
      class="margin-right-20 move-down-date margin-lin"/>
    <sn-date-picker-with-round
        @chooseDate="queryByDate"
        slot="two-col"
        class="to-flex"
        :date-picker-style="{'width':'270px'}">

<!--       :move-down="12"-->
    </sn-date-picker-with-round>
    <sn-search-input
        @inputContentChange="inputValue"
        :input-placeholder="inputPlaceholder"
        slot="three-col" class="move-down-little"/>
    <div
      class="margin-lin-left"
      slot="four-col">
      <el-button type="primary"
                 plain
                 @click="handleAdd">
        <sn-text text="新增"/>
      </el-button>
      <el-button type="primary"
                 plain
                 @click="handleInput">
        <sn-text text="扫码录入"/>
      </el-button>
<!--      <el-button-->
<!--        type="primary"-->
<!--        plain-->
<!--        icon="el-icon-plus"-->
<!--        size="mini"-->
<!--        class="move-down-little"-->
<!--        :disabled="multiple"-->
<!--        @click="handleAdd"-->
<!--      >新增</el-button>-->
<!--      <el-button-->
<!--        type="primary"-->
<!--        plain-->
<!--        icon="el-icon-update"-->
<!--        size="mini"-->
<!--        class="move-down-little"-->
<!--        :disabled="multiple"-->
<!--        @click="handleInput()"-->
<!--      >扫码录入</el-button>-->
    </div>
  </sn-row-has-four-col>
</template>

<script>
export default {
  name: "DrugChangePriceFindInfoBar",
  data() {
    return {}
  },
  props: {
    inputPlaceholder: {
      type: String,
      default: ''
    },
  },
  methods: {
    handleAdd(){
      this.$router.push({ path: "/yldrug/stocktaking/addStocktaking/"+1  }).catch(()=>{});
    },
    handleInput(){
      console.log("不支持扫码录入")
    },
    inputValue(value) {
      this.$emit("inputDscValue", value)
    },
    queryByDate(date){
      this.$emit('queryByDate',date)
    }
  }
}
</script>

<style scoped>
.move-down-little {
  position: relative;
  top: 3px;
}
.margin-lin{
  margin-top: 10px;
}
.margin-lin-left{
  margin-left: 300px;
}
</style>
